using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DelContactMsg : GeneratedMessageLite<DelContactMsg, DelContactMsg.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DelContactMsg, DelContactMsg.Builder>
		{
			private bool resultIsReadOnly;
			private DelContactMsg result;
			protected override DelContactMsg.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DelContactMsg MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DelContactMsg DefaultInstanceForType
			{
				get
				{
					return DelContactMsg.DefaultInstance;
				}
			}
			public SKBuiltinString_t UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public int MaxMsgId
			{
				get
				{
					return this.result.MaxMsgId;
				}
				set
				{
					this.SetMaxMsgId(value);
				}
			}
			public Builder()
			{
				this.result = DelContactMsg.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DelContactMsg cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DelContactMsg PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DelContactMsg other = this.result;
					this.result = new DelContactMsg();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DelContactMsg.Builder Clear()
			{
				this.result = DelContactMsg.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DelContactMsg.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DelContactMsg.Builder(this.result);
				}
				return new DelContactMsg.Builder().MergeFrom(this.result);
			}
			public override DelContactMsg BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DelContactMsg.Builder MergeFrom(IMessageLite other)
			{
				if (other is DelContactMsg)
				{
					return this.MergeFrom((DelContactMsg)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DelContactMsg.Builder MergeFrom(DelContactMsg other)
			{
				return this;
			}
			public override DelContactMsg.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DelContactMsg.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DelContactMsg._delContactMsgFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DelContactMsg._delContactMsgFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasMaxMsgId = input.ReadInt32(ref this.result.maxMsgId_);
						}
					}
					else
					{
						SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
						if (this.result.hasUserName)
						{
							builder.MergeFrom(this.UserName);
						}
						input.ReadMessage(builder, extensionRegistry);
						this.UserName = builder.BuildPartial();
					}
				}
				return this;
			}
			public DelContactMsg.Builder SetUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public DelContactMsg.Builder SetUserName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = builderForValue.Build();
				return this;
			}
			public DelContactMsg.Builder MergeUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasUserName && this.result.userName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.userName_ = SKBuiltinString_t.CreateBuilder(this.result.userName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.userName_ = value;
				}
				this.result.hasUserName = true;
				return this;
			}
			public DelContactMsg.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = null;
				return this;
			}
			public DelContactMsg.Builder SetMaxMsgId(int value)
			{
				this.PrepareBuilder();
				this.result.hasMaxMsgId = true;
				this.result.maxMsgId_ = value;
				return this;
			}
			public DelContactMsg.Builder ClearMaxMsgId()
			{
				this.PrepareBuilder();
				this.result.hasMaxMsgId = false;
				this.result.maxMsgId_ = 0;
				return this;
			}
		}
		public const int UserNameFieldNumber = 1;
		public const int MaxMsgIdFieldNumber = 2;
		private static readonly DelContactMsg defaultInstance;
		private static readonly string[] _delContactMsgFieldNames;
		private static readonly uint[] _delContactMsgFieldTags;
		private bool hasUserName;
		private SKBuiltinString_t userName_;
		private bool hasMaxMsgId;
		private int maxMsgId_;
		private int memoizedSerializedSize = -1;
		public static DelContactMsg DefaultInstance
		{
			get
			{
				return DelContactMsg.defaultInstance;
			}
		}
		public override DelContactMsg DefaultInstanceForType
		{
			get
			{
				return DelContactMsg.DefaultInstance;
			}
		}
		protected override DelContactMsg ThisMessage
		{
			get
			{
				return this;
			}
		}
		public SKBuiltinString_t UserName
		{
			get
			{
				return this.userName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public int MaxMsgId
		{
			get
			{
				return this.maxMsgId_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasUserName && this.hasMaxMsgId;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.UserName);
				}
				if (this.hasMaxMsgId)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.MaxMsgId);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DelContactMsg()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] delContactMsgFieldNames = DelContactMsg._delContactMsgFieldNames;
			if (this.hasUserName)
			{
				output.WriteMessage(1, delContactMsgFieldNames[1], this.UserName);
			}
			if (this.hasMaxMsgId)
			{
				output.WriteInt32(2, delContactMsgFieldNames[0], this.MaxMsgId);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasMaxMsgId)
			{
				num ^= this.maxMsgId_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			DelContactMsg delContactMsg = object_0 as DelContactMsg;
			return delContactMsg != null && (this.hasUserName == delContactMsg.hasUserName && (!this.hasUserName || this.userName_.Equals(delContactMsg.userName_))) && (this.hasMaxMsgId == delContactMsg.hasMaxMsgId && (!this.hasMaxMsgId || this.maxMsgId_.Equals(delContactMsg.maxMsgId_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DelContactMsg, DelContactMsg.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<DelContactMsg, DelContactMsg.Builder>.PrintField("MaxMsgId", this.hasMaxMsgId, this.maxMsgId_, writer);
		}
		public static DelContactMsg ParseFrom(byte[] data)
		{
			return DelContactMsg.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DelContactMsg MakeReadOnly()
		{
			return this;
		}
		public static DelContactMsg.Builder CreateBuilder()
		{
			return new DelContactMsg.Builder();
		}
		public override DelContactMsg.Builder ToBuilder()
		{
			return DelContactMsg.CreateBuilder(this);
		}
		public override DelContactMsg.Builder CreateBuilderForType()
		{
			return new DelContactMsg.Builder();
		}
		public static DelContactMsg.Builder CreateBuilder(DelContactMsg prototype)
		{
			return new DelContactMsg.Builder(prototype);
		}
		static DelContactMsg()
		{
			DelContactMsg.defaultInstance = new DelContactMsg().MakeReadOnly();
			DelContactMsg._delContactMsgFieldNames = new string[]
			{
				"MaxMsgId",
				"UserName"
			};
			DelContactMsg._delContactMsgFieldTags = new uint[]
			{
				16u,
				10u
			};
			object.ReferenceEquals(micromsg.Proto.DelContactMsg.Descriptor, null);
		}
	}
}
